home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / corelib / ncbimain.h < prev    next >
Text File  |  1996-07-05  |  4KB  |  110 lines

  1. /*   ncbimain.h
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:  ncbimain.h
  27. *
  28. * Author:  Gish, Kans, Ostell, Schuler
  29. *
  30. * Version Creation Date:   7/7/91
  31. *
  32. * $Revision: 2.2 $
  33. *
  34. * File Description: 
  35. *       prototypes for portable string routines
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. * 7/7/91   Kans        Multiple configuration files, get and set functions
  42. * 04-15-93 Schuler     Changed _cdecl to LIBCALL
  43. *
  44. *
  45. * ==========================================================================
  46. */
  47.  
  48. #ifndef _NCBIMAIN_
  49. #define _NCBIMAIN_
  50.  
  51. #ifdef __cplusplus
  52. extern "C" {
  53. #endif
  54.  
  55. typedef struct mainargs {
  56.   char *prompt;            /* prompt for field */
  57.   char *defaultvalue;      /* default */
  58.   char *from;              /* range or datalink type */
  59.   char *to;
  60.   Nlm_Boolean    optional;
  61.   Nlm_Char    tag;               /* argument on command line */
  62.   Nlm_Int1    type;              /* type of value */
  63.   Nlm_FloatHi    floatvalue;
  64.   Nlm_Int4    intvalue;
  65.   CharPtr    strvalue;
  66. } Nlm_Arg, * Nlm_ArgPtr;      /* (*) not PNTR for MS Windows */
  67.                     /* type is:
  68.                          0 = not set (invalid)
  69.                          1 = Boolean
  70.                          2 = Int
  71.                          3 = Float
  72.                          4 = String
  73.                          5 = file in
  74.                          6 = file out
  75.                          7 = datalink input (type in from)
  76.                          8 = datalink output
  77.                       */
  78. #define Args Nlm_Arg
  79. #define ArgPtr Nlm_ArgPtr
  80. #define ARG_BOOLEAN 1
  81. #define ARG_INT 2
  82. #define ARG_FLOAT 3
  83. #define ARG_STRING 4
  84. #define ARG_FILE_IN 5
  85. #define ARG_FILE_OUT 6
  86. #define ARG_DATA_IN 7
  87. #define ARG_DATA_OUT 8
  88.  
  89. extern Nlm_Int2 Nlm_Main PROTO((void));
  90. extern Nlm_Boolean Nlm_GetArgs PROTO((Nlm_CharPtr progname, Nlm_Int2 numargs, Nlm_ArgPtr ap));
  91. extern Nlm_Boolean LIBCALL Nlm_FindPath PROTO((Nlm_CharPtr file, Nlm_CharPtr section, Nlm_CharPtr type, Nlm_CharPtr buf, Nlm_Int2 buflen));
  92. extern Nlm_Int2 LIBCALL Nlm_GetAppParam PROTO((Nlm_CharPtr file, Nlm_CharPtr section, Nlm_CharPtr type, Nlm_CharPtr dflt, Nlm_CharPtr buf, Nlm_Int2 buflen));
  93. extern Nlm_Boolean LIBCALL Nlm_SetAppParam PROTO((Nlm_CharPtr file, Nlm_CharPtr section, Nlm_CharPtr type, Nlm_CharPtr value));
  94. extern Nlm_Boolean LIBCALL Nlm_TransientSetAppParam PROTO((Nlm_CharPtr file, Nlm_CharPtr section, Nlm_CharPtr type, Nlm_CharPtr value));
  95. extern void LIBCALL Nlm_FreeConfigStruct PROTO((void));
  96.  
  97. #define Main Nlm_Main
  98. #define GetArgs Nlm_GetArgs
  99. #define FindPath Nlm_FindPath
  100. #define GetAppParam Nlm_GetAppParam
  101. #define SetAppParam Nlm_SetAppParam
  102. #define TransientSetAppParam Nlm_TransientSetAppParam
  103. #define FreeConfigStruct Nlm_FreeConfigStruct
  104.  
  105. #ifdef __cplusplus
  106. }
  107. #endif
  108.  
  109. #endif
  110.